local unitName  =  "armmart"

local unitDef  =  {
--Internal settings
    buildpic = "ARMMART.DDS",
    Category = "KILLABLE",
    ObjectName = "armmart.3do",
    name = "Arty",
    Side = "TANKS",
    UnitName = "armmart",
    script = "armmart.cob",
    
--Unit limitations and properties
    BuildTime = 10,
    Description = "Long range unit",
    MaxDamage = 1600,
    RadarDistance = 0,
    SightDistance = 400,
    SoundCategory = "TANK",
    Upright = 0,
    
--Energy and metal related
    BuildCostEnergy = 0,
    BuildCostMetal = 120,
    
--Pathfinding and related
    Acceleration = 0.15,
    BrakeRate = 0.1,
    FootprintX = 2,
    FootprintZ = 2,
    MaxSlope = 15,
    MaxVelocity = 2.0,
    MaxWaterDepth = 20,
    MovementClass = "Default2x2",
    TurnRate = 900,
    
--Abilities
    Builder = 0,
    CanAttack = 1,
    CanGuard = 1,
    CanMove = 1,
    CanPatrol = 1,
    CanStop = 1,
    LeaveTracks = 0,
    Reclaimable = 0,

	customparams = {
		unitcost = "2",
	},
	
--Weapons and related
    ExplodeAs = "TANKDEATH",

	weapons = {
		[1] = {
			def = "arm_artillery",
			maindir = "0 0 1",
			maxangledif = 180,
			BadTargetCategory = "UNKILLABLE",
			NoChaseCategory = "UNKILLABLE",
			OnlyTargetCategory = "KILLABLE",			
		},
	},
}

local weaponDefs = {
		arm_artillery = {
			avoidfriendly = false,
			collidefriendly = false,
			accuracy = 900,
			areaofeffect = 120,
			craterboost = 0,
			cratermult = 0,
			edgeeffectiveness = 0.5,
			explosiongenerator = "custom:FLASH4",
			gravityaffected = "true",
			impulseboost = 0.0,
			impulsefactor = 0.0,
			name = "PlasmaCannon",
			noselfdamage = true,
			range = 800,
			reloadtime = 2.25,
			soundhit = "xplomed4",
			soundstart = "cannhvy2",
			turret = true,
			weapontype = "Cannon",
			weaponvelocity = 355.28158569336,
			damage = {
				default = 300,
				unkillable = 0,				
			},
		},
	}

unitDef.weaponDefs = weaponDefs

return lowerkeys({ [unitName]  =  unitDef })